package com.sunrate.investingquote.service.router.match;

import com.sunrate.investingquote.bean.router.ChannelRouter;
import com.sunrate.investingquote.dto.router.RouterMatchParam;

/**
 * @author yyh
 * @description:
 * @date 2023/06/29/ 12:49
 */
public interface RouterMatch {


    default boolean match(RouterMatchParam param, ChannelRouter router) {
        if (skip()) {
            return true;
        }
        return test(param, router);
    }

    boolean skip();

    boolean test(RouterMatchParam param, ChannelRouter router);
}
